home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle: Internet utan modem / Internet CD.iso / web / private / wwwcsc~1.edu / ~tilt / focus / focus-~1 < prev    next >
Encoding:
Text File  |  1997-02-25  |  3.8 KB  |  106 lines

  1. FOCUS 1.0
  2.  
  3. A FOrm-based Customizable User Shell
  4.  
  5. By James Eric Tilton, tilt+@cs.cmu.edu
  6. July 1993
  7.  
  8. --
  9.  
  10. This code is copyright 1993 by Willamette University and James Eric
  11. Tilton.  Permission is granted to distribute this distribution freely
  12. as it is provided.  Permission is not granted to modify this code and
  13. then distribute it.
  14.  
  15. No warranty is provided.  Use this code AS-IS.  Also, no support is
  16. provided, although the author will make a good attempt to provide
  17. helpful feedback.
  18.  
  19. (All that aside, what I'm really concerned about is making sure that
  20. any revisions to this code come through me.  Not that I'm expecting a
  21. huge amount of use, but . . . :)
  22.  
  23. --
  24.  
  25. What is FOCUS?
  26.  
  27. FOCUS is a form processor -- it provides an easy way to maintain a set
  28. of fill-in forms that can be submitted via e-mail.  If that's what you
  29. need to do, FOCUS may be your answer.
  30.  
  31. FOCUS also has some awfully baroque additions -- if what you're
  32. looking for is an easy way to provide a full-screen interface for a
  33. UN*X system, FOCUS might also be your answer.  Even though ostensibly
  34. a form-processor, FOCUS is really secretly a shell (it's even got job
  35. control!).
  36.  
  37. What systems does FOCUS run on?
  38.  
  39. To date?  It was developed on a sun4 system that had gcc installed.
  40. Unfortunately, our sun4 is about the only development platform I have
  41. access to, so I have no idea what other systems it will work on.  Feel
  42. free to attempt to modify the code to work on other systems, and let
  43. me know how it works out.
  44.  
  45. What should you modify?  I suspect the main problems will come from
  46. actions.c (and possibly interrupts.c).  FOCUS doesn't use any fancy
  47. curses stuff, so I expect that should work fine anywhere.
  48.  
  49. How do I install FOCUS?
  50.  
  51. Check "configure.c", and set up a home directory for your forms to
  52. reside in.  You might want to set it equal to the "forms" directory
  53. inside this directory -- it contains several sample forms.
  54.  
  55. Then type "make".  If you're not on a sun4 system, you'll probably
  56. want to make sure the Makefile isn't doing anything silly.
  57.  
  58. What do the different files contain?
  59. (I've got lots of time on my hands,
  60. and might want to try hacking the code
  61. so that it works on my system...)
  62.  
  63. action.c     -- this is all the code which actually executes child
  64.                 processes.  voted most likely to break on other flavors
  65.                 of UN*X.
  66. configure.h  -- definitions used in several modules.
  67. formvars.c   -- code for using both internal and environment variables.
  68. interrupts.c -- disables ^C so that it can be used by the program.
  69.                 uses system 5 termio (as I recall...)
  70. jc.c         -- job control code.
  71. parse.c      -- the form parser.
  72. screen.c     -- screen I/O (uses curses).
  73. main.c       -- initialization code, etc.
  74. bin          -- some scripts used by cso-query (must be in path to
  75.                 work for cso-query to work.)
  76. forms        -- several sample forms.
  77. focus-docs.txt -- a reference guide for creating forms.
  78.  
  79. How should I go about creating forms?
  80.  
  81. Try reading focus-docs.txt -- but be warned, it's more in the style of
  82. a reference manual then in the style of a tutorial.  Also, look at the
  83. sample forms provided.
  84.  
  85. Finally, here's an example form:
  86.  
  87. #Form: Sample Form
  88. #to: jsmith
  89. #subject: Sample Form Result
  90. #result: return
  91. Name: [$name] : 40 > $name
  92. Campus Mail Box #: [$campusmail] : 40 > $campusmail
  93. Phone #: [$voxnum] : 40 > $voxnum ;comment
  94.  
  95. What will this do?  It'll generate a form called "Sample Form", which
  96. will have three fill-outable text forms.  When the user issues a "^X",
  97. it'll mail the result to "jsmith", and then execute the result,
  98. "return"ing to the previous form.
  99.  
  100. The [$name] means that that field will be automatically pre-loaded
  101. with whatever the value of $name is.  The "> $name" means that
  102. whatever is in this form will be placed into $name when you have
  103. finished with the form.  The ": 40" indicated a preferred width for
  104. the field (and is optional).
  105.  
  106. Have fun!